import { createApp } from 'vue';
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入中文语言
import zhCn from 'element-plus/dist/locale/zh-cn.mjs';

// 创建 Vue 应用实例
const app = createApp(App)

// 注册所有图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 使用 Element Plus 插件，并配置中文语言包
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(router)

// 挂载应用
app.mount('#app');

